<!doctype html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
    <style type="text/css">
#mes{
	width: 200px;height: 300px;border: 1px solid black;
}

    </style>
</head>
<body>

<script type="text/javascript">
	onload = function(){
		btn.onclick = function(){
			var val = toMes.value;
			var oDiv = document.createElement('div');
			oDiv.innerHTML = val;
			mes.appendChild(oDiv);
			toMes.value = '';
		}
	}

</script>

<div id='mes'></div>
<textarea id='toMes'></textarea>
<input type='button' value='发送' id='btn'>
</body>
</html>